package com.hutiao.snowhb.actions.admin;

import org.apache.log4j.Logger;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

import com.hutiao.snowhb.service.PhotographerService;
import com.opensymphony.xwork2.ActionSupport;

@Namespace("/admin")
public class IndexAction extends ActionSupport {

	private static final long serialVersionUID = -7700244078884038763L;
	
	private static Logger logger = Logger.getLogger(IndexAction.class);
	
	@Autowired
	private PhotographerService photographerService;
	
	private String p;

	public String getP() {
		return p;
	}

	public void setP(String p) {
		this.p = p;
	}
	
	
	@Action(value="index")
	public String index() throws Exception {
		
		if (p==null || !p.equals("zmkm88")) {
			return ERROR;
		}
		
		return SUCCESS;
		
	}
	

}
